<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>学生信息管理</title>
	<meta name="decorator" content="default"/>
	<link type="text/css" rel="stylesheet" href="${ctxStatic}/css/hydms/students/dmsStudentsForm.css" />
	<script type="text/javascript" src="${ctxStatic}/js/hydms/students/dmsStudentsForm.js"></script>
	<script type="text/javascript" src="${ctxStatic}/layer/layer.js"></script>
	
</head>
<body>
	<ul class="nav nav-tabs">
		<%-- <li><a href="${ctx}/students/dmsStudents/list">学生信息列表</a></li> --%>
		<li class="active"><a href="${ctx}/students/dmsStudents/form?id=${dmsStudents.id}" id="hrefId">学生信息<shiro:hasPermission name="students:dmsStudents:edit">${not empty dmsStudents.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="students:dmsStudents:edit">查看</shiro:lacksPermission></a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="dmsStudents" action="${ctx}/students/dmsStudents/save" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>		
		<div class="control-group">
			<label class="control-label">学号：</label>
			<div class="controls">
				<form:input path="studentNumber" htmlEscape="false" maxlength="10" class="input-xlarge write required" pattern="^[0-9]{5,10}$" id="studentNumberId"/>
				<span class="help-inline"><font color="red" id="numberInfo">*</font></span>
				<span class="help-inline"><font>(请输入5-10位数字)</font></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">学生姓名：</label>
			<div class="controls">
				<form:input path="studentName" htmlEscape="false" maxlength="10" class="input-xlarge write required" pattern="" id="studentNameId"/>
				<span class="help-inline"><font color="red" id="numberInfo1">*</font> </span>
				<span class="help-inline"><font>(不能包含@#￥%...)</font></span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">学生性别：</label>
			<div class="controls">
				<form:select path="studentSex" class="input-xlarge write required">
				<form:option value="" label="请选择"/>
				<form:option value="男" label="男"/>
				<form:option value="女" label="女"/>
					<form:options items="${fns:getDictList('studentSex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
					<span class="help-inline"><font color="red" >*</font> </span>
				</form:select>
			</div>
		</div>
		<div class="hide" >
			<label class="control-label">宿舍号：</label>
			<div class="controls">
				<form:input path="dormitoryNumber" htmlEscape="false" maxlength="10" class="input-xlarge write" value=""/>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">班级：</label>
			<div class="controls">
				<form:input path="classesNumber" htmlEscape="false" maxlength="10" class="input-xlarge write required"/>
				<span class="help-inline"><font color="red" id="numberInfo2">*</font> </span>
				<span class="help-inline"><font>(如：17级2班)</font></span>
			</div>
		</div>
			<div class="control-group">
				<label class="control-label">入住日期：</label>
				<div class="controls">
					<input name="checkInDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate required"
						value="<fmt:formatDate value="${dmsStudents.checkInDate}" pattern="yyyy-MM-dd"/>"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d',isShowClear:false});"/>
						<span class="help-inline"><font color="red" >*</font> </span>
			</div>
					</div>
		<div class="control-group">
			<label class="control-label">联系电话：</label>
			<div class="controls">
				<form:input path="phoneNumber" htmlEscape="false" maxlength="11" class="input-xlarge write required" id="phoneNumberId" pattern="^\d{11}$"/>
				<span class="help-inline"><font color="red" id="numberInfo3">*</font> </span>
				<span class="help-inline"><font>(请输入11位手机号)</font></span>
			</div>
		</div>
		 <%-- <div class="control-group">
			<label class="control-label">退房日期：</label>
			<div class="controls">
				<input name="checkOutDate" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate "
					value="<fmt:formatDate value="${dmsStudents.checkOutDate}" pattern="yyyy-MM-dd "/>"
					onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
			</div> 
		</div>
		
		<div class="control-group">
			<label class="control-label">住宿总费用：</label>
			<div class="controls">
				<form:input path="allFee" htmlEscape="false" maxlength="20" class="input-xlarge write"/>
			</div>
		</div> --%>
		<div class="form-actions">
			<shiro:hasPermission name="students:dmsStudents:edit"><input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;</shiro:hasPermission>
			<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
		</div>
	</form:form>
</body>
</html>